package com.xuetang9.wordreview.utils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>Description:  分页请求</p>
 * <p>CreateTime:   2020/6/5 </p>
 *
 * @author zhanweijie
 */
@Data
@ApiModel("分页")
public class PageRequest {

    @ApiModelProperty(value = "单页条数", dataType = "long", required = true, example = "10")
    private long size = 10;
    @ApiModelProperty(value = "当前页", dataType = "long", required = true, example = "1")
    private long current = 1;

    public Page pager() {
        Page page = new Page();
        page.setCurrent(this.current);
        page.setSize(this.size);
        return page;
    }
}
